home *** CD-ROM | disk | FTP | other *** search
/ PC Elektro 3 / PC-Elektro-3-cd1.bin / KBan 2.0 / KBANSRC.LZH / SRC / PROG / KBANINFO.H < prev    next >
Encoding:
C/C++ Source or Header  |  1997-10-05  |  3.0 KB  |  112 lines

  1. /*
  2.  * a header of the class KBAN_INFO
  3.  * Copyright (C) 1996, 1997 Kazutaka Hirata <khirata@jove.acs.unt.edu>
  4.  */
  5.  
  6. #ifndef _KBANINFO_H_
  7. #define _KBANINFO_H_
  8.  
  9. #include "kbandata/kbandata.h"
  10.  
  11. #include "grid.h"
  12.  
  13. #define FNAME_MAX_LEN 300
  14.  
  15. #if 0
  16. class BLOCK_INFO {
  17. public:
  18.   enum BLOCK_TYPE { BLOCK_LAYER, BLOCK_ALL };
  19. private:
  20.   bool m_bBlocked;
  21.   BLOCK_TYPE m_block_type;
  22.   uint m_nLayer;
  23. public:
  24.   bool& bBlocked() { return m_bBlocked; }
  25.   BLOCK_TYPE& block_type() { return m_block_type; }
  26.   uint& nLayer() { return m_nLayer; }
  27. };
  28. #endif
  29.  
  30. class KBAN_INFO {
  31.   // member variables
  32.   // aperture
  33.   APERTURE     m_apt_pin;
  34.   APERTURE     m_apt_line;
  35.  
  36.   ACTIVE_LAYER m_active_layer;
  37.   FLAG         m_fill;
  38.   FLAG         m_hole;
  39.   FLAG         m_lflags[LAYER_NUMBER];
  40.   GRID         m_grid;
  41.   KBAN_DATA    m_kban_data;
  42.   APT_TABLE    m_apt_pin_table;
  43.   APT_TABLE    m_apt_line_table;
  44.  
  45.   // block
  46.   // BLOCK_INFO   m_block_info;
  47.   // BLOCK_INFO   m_clip_info;
  48.   // LAYER        m_clipped_layer;
  49.   bool         m_bSelected;
  50.   bool         m_bClipped;
  51.   KBAN_DATA    m_clipped_data;
  52.  
  53.   bool         m_bCaptured;
  54.  
  55.   FLAG         m_new_state;
  56.   std::string  m_new_state_str;
  57. public:
  58.   // constructor(s)
  59.   KBAN_INFO()
  60.     : m_active_layer(LAYER_PATTERN_TOP),
  61.       m_apt_pin (APERTURE::APT_ROUND, 1000, 0, 900),
  62.       m_apt_line(APERTURE::APT_ROUND,  500, 0,   0),
  63.       m_fill(0),
  64.       m_hole(0),
  65.       m_grid(),
  66.       m_kban_data(),
  67.       m_bCaptured(false),
  68.       m_new_state(0)
  69.     {}
  70.  
  71.   // destructor
  72.   virtual ~KBAN_INFO() {}
  73.  
  74.   // member functions
  75.  
  76.   bool operator==(const KBAN_INFO& rval) const; // dummy and illegal
  77.   bool operator!=(const KBAN_INFO& rval) const; // dummy and illegal
  78.   bool operator<(const KBAN_INFO& rval) const; // dummy and illegal
  79.   bool operator>(const KBAN_INFO& rval) const; // dummy and illegal
  80.  
  81.   // aperture
  82.   APERTURE&     apt_pin()  { return m_apt_pin; }
  83.   APERTURE&     apt_line() { return m_apt_line; }
  84.  
  85.   ACTIVE_LAYER& active_layer() { return m_active_layer; }
  86.  
  87.   FLAG&         fill() { return m_fill; }
  88.   FLAG&         hole() { return m_hole; }
  89.   FLAG*         lflags() { return m_lflags; }
  90.   GRID&         grid() { return m_grid; }
  91.   KBAN_DATA&    kban_data() { return m_kban_data; }
  92.   APT_TABLE&    apt_pin_table () { return m_apt_pin_table;  }
  93.   APT_TABLE&    apt_line_table() { return m_apt_line_table; }
  94.  
  95.   // block
  96.   // BLOCK_INFO&   block_info() { return m_block_info; }
  97.   // BLOCK_INFO&   clip_info() { return m_clip_info; }
  98.   // LAYER&        clipped_layer() { return m_clipped_layer; }
  99.   bool&         bSelected() { return m_bSelected; }
  100.   bool&         bClipped() { return m_bClipped; }
  101.   KBAN_DATA&    clipped_data() { return m_clipped_data; }
  102.  
  103.   bool&         bCaptured() { return m_bCaptured; }
  104.  
  105.   FLAG&         new_state() { return m_new_state; }
  106.   std::string&  new_state_str() { return m_new_state_str; }
  107.  
  108.   virtual void SetModifiedFlag(bool bModified = true) = 0;
  109. };
  110.  
  111. #endif /* _KBANINFO_H_ */
  112.